﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>

<div class="fr-widget white-space width80">
    <div class="header">
        <div class="icon">
        </div>
        <span><%=ForumContext.GetText("REGISTER","PAGE_NAME") %></span>
    </div>
    <%using (Html.BeginForm("Register", "Member", FormMethod.Post, new { @id = "Register", @onRequest = "$.MvcForum.showLoading();", @onSuccess = "$.MvcForum.hideLoading();$.MvcForum.ajaxSuccess(msg);" }))
      {
  
    %>
    <%=Html.AntiForgeryTokenX("REGISTER") %>
    <input type="hidden" value="<%=Request.QueryString["returnUrl"] %>" id="_returnUrl" name="_returnUrl" />
    <table cellpadding="0" cellspacing="1" width="100%">
        <tr>
            <td class="table-caption" colspan="2">
                <%=ForumContext.GetText("REGISTER","REG_INFO") %>
            </td>
        </tr>
        <tr>
            <td class="table-cell width30">
               <%=ForumContext.GetText("REGISTER","USERNAME") %>
            </td>
            <td class="table-cell">
                <input type="text" id="username" name="username" onkeyup="this.value=this.value.replace(/[^a-z0-9A-Z\-\_]/ig, '')" class="input {validate:{required:true}}" />
            </td>
        </tr>
        <tr>
            <td class="table-cell">
               <%=ForumContext.GetText("REGISTER","PWD") %>
            </td>
            <td class="table-cell">
                <input type="password" name="pwd" id="pwd" class="input {validate:{required:true}}"/>
            </td>
        </tr>
        <tr>
            <td class="table-cell">
                <%=ForumContext.GetText("REGISTER", "REPWD")%>
            </td>
            <td class="table-cell">
                <input type="password" name="repwd" id="repwd" class="input {validate:{required:true,equalTo:'#pwd'}}"/>
            </td>
        </tr>
        <tr>
            <td class="table-cell">
               <%=ForumContext.GetText("REGISTER", "EMAIL")%>
            </td>
            <td class="table-cell">
                <input type="text" name="email" id="email" class="input {validate:{required:true,email:true}}"/>
            </td>
        </tr>


        <%-- <tr>
            <td class="table-cell">
               <%=ForumContext.GetText("REGISTER", "EMAIL")%>
            </td>
            <td class="table-cell">
                <%=Html.CaptchaGenerate() %>
            </td>
        </tr>
--%>


        <tr>
            <td colspan="2" class="table-caption">
                <%=ForumContext.GetText("REGISTER", "REGISTER_OPTIONS")%>
            </td>
        </tr>
        <tr>
            <td class="table-cell">
               <%=ForumContext.GetText("REGISTER", "TIMEZONE")%>
            </td>
            <td class="table-cell">
                <select style="min-width: 220px" class="select" id="timezone" name="timezone">
                    <%
                        var _timeZones = ViewData["TimeZoneList"] as List<MvcForum.Net.Business.TimeZone>;
                        if (_timeZones != null)
                        {
                            foreach (var timeZone in _timeZones)
                            {
  
                    %>
                    <option value="<%=timeZone.Offset %>" <%=ForumContext.Configuration.TimeZoneOffset==timeZone.Offset?"selected=\"selected\"":string.Empty %>>
                        <%=Html.Encode(timeZone.ZoneName) %></option>
                    <%
                  

}
                        }
                    %>
                </select>
            </td>
        </tr>
        <tr>
            <td class="table-cell">
                &nbsp;
            </td>
            <td class="table-cell">
                <input type="button" onclick="$.MvcForum.ajaxSubmit('Register')" value="<%=ForumContext.GetText("REGISTER", "REGISTER")%>" class="button" />
            </td>
        </tr>
    </table>
    <%} %>
</div>

